<html>
    <head>
        <meta charset="utf-7">
        <title>登陆界面</title>
        <link rel="stylesheet" href="CSS/index.css">
    </head>
    <body>
        <form>
            <h2>登录界面</h2>
            <input id="username" type="text" placeholder="请输入账号">
            <input id="password" type="text" placeholder="请输入密码">
            <div class="mya">
                <a href="">忘记密码</a>
                <a href="">注册</a>
            </div>
            <a href=blogindex.html><button id="login-btn" type="button">登录<tton></a>
        </form>
        <script>
            let username = document.getElementById('username')
            let password = document.getElementById('password')
            let loginBtn = document.getElementById('login-btn')
            loginBtn.onclick = function() {
                let usernamevalue = username.value
                let passwordvalue = password.value
                if (!usernamevalue) {
                    return alert('请输入正确的用户名')
                }
                console.log(usernamevalue, passwordvalue)
            }
        </script>
    </body>
</html>